package cn.xf;

/**
 * 测试深拷贝
 */
public class TestCloneDeep {

    public static void main(String[] args) throws CloneNotSupportedException {
        Person p = new Person(new Stud());
        Person p1 = (Person) p.clone();
        System.out.println(p);
        System.out.println(p1);
        System.out.println(p.getStud()==p1.getStud());
    }
}
